<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateArticlesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('articles', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('cate_id')->default(0)->comment('分类id');
            $table->string('title')->default('')->comment('标题');
            $table->text('content')->comment('内容');
            $table->string('image')->default('/public/images/public.png')->comment('文章主图');
            $table->enum('status',[0,1])->default(1)->comment('是否删除 1还在 0删除');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('articles');
    }
}
